package com.yuyue.springFramework.note07.entity;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.PriorityOrdered;
import org.springframework.core.type.AnnotatedTypeMetadata;

/**
 * 定义一定通过的条件实现类，以实现 PriorityOrdered 作为排序方式
 */
public class Condition3 implements Condition, PriorityOrdered {
    @Override
    public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
        System.out.println("Condition3");
        return true;
    }

    @Override
    public int getOrder() {
        return 3;
    }
}
